{% extends "base.html" %}
{% load charts %}


{% block section_title %} Stats {% endblock %}

{% block content %}

<div class="grid_12" id="content">

    <h3>15 most popular species</h3>

        {% for s in popular_species  %}
            <p class="barp">
                <a href="{% url species_detail s.id %}">{% if s.common_name %}{{s.common_name}}{% else %}{{s.latin_name}}{% endif %}</a>
                <div class="barchart" style="width:{% widthratio s.lastcount most_pop.lastcount 90 %}%;">{{s.lastcount}}</div>
            </p>
            
        {% endfor %}	
        
    <p class="major"><a href="{% url species_all %}">View all species in our database</a>    	</p>

	<div class="clear"></div>

	
</div>
<!-- end .grid_9 -->

	
	

    <img src="http://chart.apis.google.com/chart?&chco=26997D&chs=700x400&chd=t:{% for c in s_counts %}{{c}}{% if not forloop.last %},{% endif %}{% endfor %}&cht=p&chl={% for l in s_labels %}{{l}}{% if not forloop.last %}|{% endif %}{% endfor %}">


	    <h3>Caretakers: Private or Department of Public Works?</h3>

	    <img src="http://chart.apis.google.com/chart?cht=p3&chd=t:{% widthratio dpw_count treecount 100 %},{% widthratio private_count treecount 100 %}&chs=600x200&chl=Department of Public Works|Private&chco=26997D">

	<p>	
		Cared for by DPW: {{dpw_count}} ({% widthratio dpw_count treecount 100 %}%)<br />
		Privately maintained: {{private_count}} ({% widthratio private_count treecount 100 %}%)<br />
	</p>
	
	


	    
    <h3>Trees vs. Landscaping</h3>

        <img src="http://chart.apis.google.com/chart?cht=p3&chd=t:{% widthratio tree_type_count treecount 100 %},{% widthratio landscape_type_count treecount 100 %}&chs=500x200&chl=Trees|Landscaping&chco=26997D">

<p>	Total trees: {{tree_type_count}} ({% widthratio tree_type_count treecount 100 %}%)<br />
	Total landscaping fixtures: {{landscape_type_count}} ({% widthratio landscape_type_count treecount 100 %}%)<br />
</p>





{% endblock %}



